<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Common triggering Functions for multiple SAR instances</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__sar__functions__trig.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Common triggering Functions for multiple SAR instances<div class="ingroups"><a class="el" href="group__group__sar.html">SAR          (SAR ADC Subsystem)</a> &raquo; <a class="el" href="group__group__sar__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>This set of functions is for initialization and usage of SAR common settings and simultaneous triggering. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gabfc5aeb0ba42969e628e767bc670b153"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__sar__enums.html#ga4061024a91b0f2e3aca4716fce722b57">cy_en_sar_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__sar__functions__trig.html#gabfc5aeb0ba42969e628e767bc670b153">Cy_SAR_CommonInit</a> (PASS_Type *base, const <a class="el" href="structcy__stc__sar__common__config__t.html">cy_stc_sar_common_config_t</a> *trigConfig)</td></tr>
<tr class="memdesc:gabfc5aeb0ba42969e628e767bc670b153"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize common SAR configuration registers.  <a href="#gabfc5aeb0ba42969e628e767bc670b153">More...</a><br /></td></tr>
<tr class="separator:gabfc5aeb0ba42969e628e767bc670b153"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gabfc5aeb0ba42969e628e767bc670b153"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabfc5aeb0ba42969e628e767bc670b153">&#9670;&nbsp;</a></span>Cy_SAR_CommonInit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__sar__enums.html#ga4061024a91b0f2e3aca4716fce722b57">cy_en_sar_status_t</a> Cy_SAR_CommonInit </td>
          <td>(</td>
          <td class="paramtype">PASS_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcy__stc__sar__common__config__t.html">cy_stc_sar_common_config_t</a> *&#160;</td>
          <td class="paramname"><em>trigConfig</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize common SAR configuration registers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing PASS registers.</td></tr>
    <tr><td class="paramname">trigConfig</td><td>Pointer to structure containing configuration data. See <a class="el" href="structcy__stc__sar__common__config__t.html">cy_stc_sar_common_config_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li><a class="el" href="group__group__sar__enums.html#gga4061024a91b0f2e3aca4716fce722b57a1bcc04151b677cb6e16050b40309b21a">CY_SAR_SUCCESS</a> : initialization complete</li>
<li><a class="el" href="group__group__sar__enums.html#gga4061024a91b0f2e3aca4716fce722b57a57b9a5eff2273406f83163b1327d90a3">CY_SAR_BAD_PARAM</a> : input pointers are null, initialization incomplete</li>
</ul>
</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <a class="code" href="group__group__sar__enums.html#ga4061024a91b0f2e3aca4716fce722b57">cy_en_sar_status_t</a> status;</div><div class="line"></div><div class="line">    <span class="keyword">const</span> <a class="code" href="structcy__stc__sar__common__config__t.html">cy_stc_sar_common_config_t</a> config =</div><div class="line">    {</div><div class="line">    <span class="comment">/* .pwrUpDelay              */</span>  0UL,                                    </div><div class="line">    <span class="comment">/* .scanCount               */</span>  16UL,                                   </div><div class="line">    <span class="comment">/* .simultControl           */</span>  <a class="code" href="group__group__sysanalog__sar__select.html#gad932345b6de5ba9d894268a54ee6d035">CY_SAR_SAR0</a> | <a class="code" href="group__group__sysanalog__sar__select.html#ga94461e8af630635d798578036a947a91">CY_SAR_SAR1</a>,              </div><div class="line">    <span class="comment">/* .simultTrigSource        */</span>  <a class="code" href="group__group__sysanalog__sar__select.html#gad932345b6de5ba9d894268a54ee6d035">CY_SAR_SAR0</a>,                            </div><div class="line">    <span class="comment">/* .simultTrigEvent         */</span>  <a class="code" href="group__group__sar__enums.html#gga7827be6e5970428e35f3311aec9fda72abe34071b3c50c2b1c8fbc062bc4f40da">CY_SAR_SIMULT_TRIG_EVENT_EDGE</a>,          </div><div class="line">    <span class="comment">/* .simultTrigSync          */</span>  <a class="code" href="group__group__sar__enums.html#gga0aec59675d46a2d0416442a04f4c0c7ca896f68d0c1993c3f5a8f7d6fa859ba0a">CY_SAR_SIMULT_TRIG_SYNC_SAR_CLOCK</a>,      </div><div class="line">    <span class="comment">/* .simultSamplesPerTrigger */</span>  <a class="code" href="group__group__sar__enums.html#gga5919efbd8aef73233b3d217261b8563fa7a54d2d6de9e0f7e56c22c8b9e8ad8bd">CY_SAR_SIMULT_TRIG_SAMPLE_SCAN_CNT</a>,     </div><div class="line">    <span class="comment">/* .simultEOSIntrSelect     */</span>  <a class="code" href="group__group__sar__enums.html#ggaad4313abe3a6ed32a2e09e09c94189c7a7dcc8bf1995722d9abec4ebbdd62c807">CY_SAR_SIMULT_TRIG_INTR_EOS</a>             </div><div class="line">    };</div><div class="line"></div><div class="line">    status = <a class="code" href="group__group__sar__functions__trig.html#gabfc5aeb0ba42969e628e767bc670b153">Cy_SAR_CommonInit</a>(PASS, &amp;config);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span> (<a class="code" href="group__group__sar__enums.html#gga4061024a91b0f2e3aca4716fce722b57a1bcc04151b677cb6e16050b40309b21a">CY_SAR_SUCCESS</a> != status)</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div></div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
